package com.easylinkin.sm.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * 语言实体类
 *
 * @author TianGanLin
 * @since 0.1.0-SNAPSHOT, 2018/11/6
 */
@Data
@Entity
@Table(name = "sm_language")
@TableName("sm_language")
@FieldNameConstants
@DynamicInsert
@DynamicUpdate
public class Language implements Serializable {

  /**
   * 主键
   */
  @Min(Long.MIN_VALUE)
  @Max(Long.MAX_VALUE)
  @Id
  @GeneratedValue
  @Column(name = "language_id_")
  private Long languageId;

  /**
   * 语言编码
   */
  @Size(max = 32)
  @Column(name = "code_", length = 32)
  private String code;

  /**
   * 语言描述
   */
  @Size(max = 32)
  @Column(name = "description_", length = 32)
  private String description;
}
